package com.vishu.collections;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class CollectionsClassMethods {
	public static void main(String args[])
	{
	
		ArrayList<String> al1=new ArrayList<String>();
		al1.add("hi");
		al1.add("where");
		al1.add("hello");
		al1.add("wassup");
		
		CollectionsClassMethods c=new CollectionsClassMethods();
		
		//sorting the elements of the array list
		c.sort(al1);  //Sorts the elements of List. Not supported by Tree since already sorted.
	
	}
	
	void sort(List<String> list)
	{
		
		
		System.out.println("Before Sort:"+list);
		
		Collections.sort(list);
		
		System.out.println("After Sort:"+list);
		
	}


}
